﻿using System;
using System.Web.Mvc;
using Adf.Core.Entity;
using CYQ.Data.Table;

namespace Test.Interface
{
    public interface ILogin
    {
        /// <summary>
        /// 初始化值
        /// 袁赛
        /// 2020-5-22
        /// </summary>
        /// <returns></returns>
        MDataRow InitDataRow();

        /// <summary>
        /// 获得实体
        /// 袁赛
        /// </summary>
        /// <param name="sUserCode">通知编号</param>
        /// <param name="bCache">是否启用缓存</param>
        /// <returns></returns>
        MDataRow GetEntityWithUserCode(string sUserCode, bool bCache = false);



        /// <summary>
        /// 增加数据
        /// 袁赛
        /// </summary>
        /// <param name="dataRow"></param>
        /// 
        /// <returns></returns>

        ExeMsgInfo Add(MDataRow dataRow);

        /// <summary>
        /// 更新数据
        /// 袁赛
        /// </summary>
        /// <param name="dataRow"></param>
        /// <returns></returns>

        ExeMsgInfo Update(MDataRow dataRow);

        /// <summary>
        /// 删除数据
        /// 袁赛
        /// </summary>
        /// <param name="sUserCode">通知编号</param>
        /// <returns></returns>

        ExeMsgInfo DeleteByUserCode(string sUserCode);



        /// <summary>
        ///获得列表
        /// 袁赛
        /// </summary>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">页大小</param>
        /// <param name="orderBy">排序</param>
        /// <param name="recordCount">总数</param>
        /// <param name="pageCount">总页数</param>
        /// <returns></returns>

        MDataTable GetList(int pageIndex, int pageSize, String orderBy, ref int recordCount, ref int pageCount);






        /// <summary>
        /// 获得用户输入密码，账号验证是否正确
        /// </summary>
        /// <param name="sUserCode"></param>
        /// <param name="sPassWord"></param>
        /// <returns></returns>

        ExeMsgInfo CheckUserLogin(String sUserCode,String sPassWord);


    }
}